package com.java.comprehensive.design.building_modelling.abstract_factory_pattern.cainiao;

import cn.hutool.core.util.StrUtil;

/**
 * @program: comprehensive-service
 *
 * @description:
 *
 * @author: 窦绍飞
 *
 * @create: 2021-11-23 16:22
 **/
public class ShapeFactory extends AbstractFactory {
	/** circle 形状 **/
	public static String CIRCLE = "circle";
	public static String RECTANGLE = "rectangle";
	public static String SQUARE = "square";
	public static String MSG = "This is ";

	@Override
	public Shape getShape(String shapeType) {
		Shape shape = null;
		if (StrUtil.isBlank(shapeType))
			return null;
		if (shapeType.equals(ShapeFactory.CIRCLE)) {
			shape = new Circle();
		} else if (shapeType.equals(ShapeFactory.RECTANGLE)) {
			shape = new Rectangle();
		} else if (shapeType.equals(ShapeFactory.SQUARE)) {
			shape = new Square();
		}

		return shape;
	}

	@Override
	public Color getColor(String colorType) {
		return null;
	}
}
